{{Extend "layout"}}
{{Block "title"}}{{if HasSuffix URL.Path "_add"}}{{"添加FTP用户组"|T}}{{else}}{{"修改FTP用户组"|T}}{{end}}{{/Block}}
{{Block "breadcrumb"}}
{{Super}}
<li><a href="__BACKEND__/ftp/account">{{"FTP用户组"|T}}</a></li>
<li class="active">{{if HasSuffix URL.Path "_add"}}{{"添加"|T}}{{else}}{{"修改"|T}}{{end}}</li>
{{/Block}}
{{Block "main"}}
<div class="row">
    <div class="col-md-12">
        <div class="block-flat">
          <div class="header">							
            <h3>{{if HasSuffix URL.Path "_add"}}{{"添加FTP用户组"|T}}{{else}}{{"修改FTP用户组"|T}}{{end}}</h3>
          </div>
          <div class="content">
              <form class="form-horizontal group-border-dashed" method="POST" action="">
              <div class="form-group">
                <label class="col-sm-2 control-label">{{"组名称"|T}}</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="name" value="{{Form "name"}}">
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-2 control-label">{{"授权目录"|T}}</label>
                <div class="col-sm-8">
                  <input type="text" class="form-control" name="directory" value="{{Form "directory"}}">
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-2 control-label">{{"IP白名单"|T}}</label>
                <div class="col-sm-8">
                  <textarea class="form-control" name="ipWhitelist">{{Form "ipWhitelist"}}</textarea>
                  <div class="help-block">{{"IP白名单。一行一个"|T}}</div>
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-2 control-label">{{"IP黑名单"|T}}</label>
                <div class="col-sm-8">
                  <textarea class="form-control" name="ipBlacklist">{{Form "ipBlacklist"}}</textarea>
                  <div class="help-block">{{"IP黑名单。一行一个"|T}}</div>
                </div>
              </div>
              
              <div class="form-group">
                <label class="col-sm-2 control-label">{{"状态"|T}}</label>
                <div class="col-sm-8">
                  {{$v := Form "disabled"}}
                  <div class="radio radio-primary radio-inline"> 
                    <input type="radio" value="N" id="disabled-N" name="disabled"{{if or (eq $v "N") (eq $v "")}} checked{{end}}><label for="disabled-N">{{"启用"|T}}</label> 
                  </div>
                  <div class="radio radio-danger radio-inline"> 
                    <input type="radio" value="Y" id="disabled-Y" name="disabled"{{if eq $v "Y"}} checked{{end}}><label for="disabled-Y">{{"禁用"|T}}</label> 
                  </div>
                </div>
              </div>

              
              <div class="form-group">
                <label class="col-sm-2 control-label">{{"组用户连接控制"|T}}</label>
                <div class="col-sm-8">
                  {{$v := Form "banned"}}
                  <div class="radio radio-primary radio-inline"> 
                    <input type="radio" value="N" id="banned-N-visitor" name="banned"{{if or (eq $v "N") (eq $v "")}} checked{{end}}><label for="banned-N">{{"允许连接"|T}}</label> 
                  </div>
                  <div class="radio radio-danger radio-inline"> 
                    <input type="radio" value="Y" id="banned-Y" name="banned"{{if eq $v "Y"}} checked{{end}}><label for="banned-Y">{{"禁止连接"|T}}</label> 
                  </div>
                </div>
              </div>
              
              <div class="form-group form-submit-group">
									<div class="col-sm-9 col-sm-offset-2">
									  <button type="submit" class="btn btn-primary btn-lg"><i class="fa fa-save"></i> {{"保存"|T}}</button>
									  <button type="reset" class="btn btn-default btn-lg"><i class="fa fa-refresh"></i> {{"重置"|T}}</button>
									</div>
							</div>
            </form>
          </div><!-- /.content -->
        </div><!-- /.block-flat -->
    </div>
</div>
{{/Block}}